package com.ygqh.baby.model;

import com.ygqh.baby.ao.ProductStatus;
import com.ygqh.baby.ao.PromotionType;
import com.ygqh.baby.ao.SendType;
import com.ygqh.baby.po.YgBrand;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class YgProductModel implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 8619017612538263438L;

    private Long id;

    private Long groupId;

    private String productName;

    private String productCode;

    private String productType;

    private BigDecimal productOriginalPrice;

    private BigDecimal productSalePrice;

    private String unitName;

    private String detailImagePath;

    private ProductStatus saleStatus;

    private String shortName;

    private List<YgProductImagesModel> productImages;

    private List<YgSkuModel> skus;

    private PromotionType promotionType;

    private BigDecimal newCustomPrice;
    private BigDecimal vipPrice;

    private Boolean isSpecial;

    private Date preSaleDate;
    private BigDecimal promotionPrice;
    private YgBrand brand;
    private String sellingPoint;

    private BigDecimal distributionPrice;

    private BigDecimal shareRate;

    private String promotionTag;
    private Boolean sevenReturn;

    private BigDecimal sharePrice;

    private SendType sendType;

    private String categoryNames;

    public Boolean getSevenReturn() {
        return sevenReturn;
    }

    public void setSevenReturn(Boolean sevenReturn) {
        this.sevenReturn = sevenReturn;
    }

    public BigDecimal getShareRate() {
        return shareRate;
    }

    public void setShareRate(BigDecimal shareRate) {
        this.shareRate = shareRate;
    }

    public BigDecimal getDistributionPrice() {
        return distributionPrice;
    }

    public void setDistributionPrice(BigDecimal distributionPrice) {
        this.distributionPrice = distributionPrice;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public BigDecimal getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(BigDecimal vipPrice) {
        this.vipPrice = vipPrice;
    }

    public Boolean getIsSpecial() {
        return isSpecial;
    }

    public void setIsSpecial(Boolean isSpecial) {
        this.isSpecial = isSpecial;
    }

    public Date getPreSaleDate() {
        return preSaleDate;
    }

    public void setPreSaleDate(Date preSaleDate) {
        this.preSaleDate = preSaleDate;
    }

    public PromotionType getPromotionType() {
        return promotionType;
    }

    public void setPromotionType(PromotionType promotionType) {
        this.promotionType = promotionType;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public BigDecimal getProductOriginalPrice() {
        return productOriginalPrice;
    }

    public void setProductOriginalPrice(BigDecimal productOriginalPrice) {
        this.productOriginalPrice = productOriginalPrice;
    }

    public BigDecimal getProductSalePrice() {
        return productSalePrice;
    }

    public void setProductSalePrice(BigDecimal productSalePrice) {
        this.productSalePrice = productSalePrice;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getDetailImagePath() {
        return detailImagePath;
    }

    public void setDetailImagePath(String detailImagePath) {
        this.detailImagePath = detailImagePath;
    }

    public ProductStatus getSaleStatus() {
        // 商品详情页。当销售状态为上架不可见时返回上架
        if (saleStatus != null && saleStatus.equals(ProductStatus.Invisible)) {
            return ProductStatus.OnSale;
        }
        return saleStatus;
    }

    public ProductStatus getSourceSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(ProductStatus saleStatus) {
        this.saleStatus = saleStatus;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public List<YgProductImagesModel> getProductImages() {
        return productImages;
    }

    public void setProductImages(List<YgProductImagesModel> productImages) {
        this.productImages = productImages;
    }

    public List<YgSkuModel> getSkus() {
        return skus;
    }

    public void setSkus(List<YgSkuModel> skus) {
        this.skus = skus;
    }

    public BigDecimal getNewCustomPrice() {
        return newCustomPrice;
    }

    public void setNewCustomPrice(BigDecimal newCustomPrice) {
        this.newCustomPrice = newCustomPrice;
    }

    public BigDecimal getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(BigDecimal promotionPrice) {
        this.promotionPrice = promotionPrice;
    }

    public YgBrand getBrand() {
        return brand;
    }

    public void setBrand(YgBrand brand) {
        this.brand = brand;
    }

    public String getSellingPoint() {
        return sellingPoint;
    }

    public void setSellingPoint(String sellingPoint) {
        this.sellingPoint = sellingPoint;
    }

    public String getPromotionTag() {
        return promotionTag;
    }

    public void setPromotionTag(String promotionTag) {
        this.promotionTag = promotionTag;
    }

    public BigDecimal getSharePrice() {
        return sharePrice;
    }

    public void setSharePrice(BigDecimal sharePrice) {
        this.sharePrice = sharePrice;
    }

    public SendType getSendType() {
        return sendType;
    }

    public void setSendType(SendType sendType) {
        this.sendType = sendType;
    }

    public String getSendTypeDesc() {
        return sendType == null ? null : sendType.getTitle();
    }

    public String getCategoryNames() {
        return categoryNames;
    }

    public void setCategoryNames(String categoryNames) {
        this.categoryNames = categoryNames;
    }
}